// JavaScript Document
//��ѡ
function selectAll_bak(chk)
{
var chk = document.form1.chkAll.checked;
for (i=0;i<document.all.length;i++) {
if (document.all[i].name=="y_id[]") {
document.all[i].checked=chk;
chkRow(document.all[i]);
}}}
function selectAll(chk)
{
	var el = document.getElementsByTagName('input');
	var len = el.length;
	for(var i=0; i<len; i++)
	{
		if((el[i].type=="checkbox") && (el[i].name=="y_id[]") &&el[i].checked == false )
		{
			el[i].checked = true;
		}else
		{
			el[i].checked = false;
		}
			
	}
}
//��ѡ��Ԫ���ɫ
function chkRow(obj){
var r = obj.parentElement.parentElement;
if(obj.checked){ r.style.backgroundColor="#F0F5FD";}
else {if(r.rowIndex%2==1)r.style.backgroundColor="#FFFFFF";else r.style.backgroundColor="";}
}